====================================================================
M1 Garand Version 1.1
Converted from Fallout 3 to GTAIV by X42.0
Credits for model, textures and sounds goes to whoever created them!
====================================================================

Change Log:
Added M1 Garand icon, made by me
Added missing texture of the bullets which could be seen at a certain angle at the top of the gun.


Note: I am assuming for the most part that the reader does not know how to install mods for GTAIV, so I try to explain each step very thoroughly to avoid any confusion!

==================
INSTALLING THE GUN
==================

	Download OpenIV (google it) if you don't have it
	Run OpenIV, go to models>cdimages at the left, and double click on weapons.img at the right
	Click on Edit Mode near the top, or else you can't change anything
	Navigate to the folder my mod is in, and drag w_rifle.wdr and w_rifle.wtd into the OpenIV window
	Double click on w_rifle.wdr and the gun should show up correctly. If not, repeat step 4 because something went wrong.
	

You now have the gun model and textures installed, but you aren't done yet!


=====
SOUND (If you don't care about/are too lazy to install the gunshot sound skip down to WEAPONINFO.)
=====

Note: Because in GTAIV there is no sound when a gun runs out of ammo, there is no way that I know of to make the legendary PING sound occur :(.


	Download and run SparkIV (google it), and follow the SparkIV steps below:
		Click on browse. 
		In the left column expand PC/AUDIO/ then click on SFX.
		Find resident.rpf to the right and double click on it.
		If asked to make the file writable, click yes.
		Click on RESIDENT to the left.
		Find and click once on WEAPONS.ivaud to the right, then click export at the top
		Export the file wherever you like
	Download GTA-IVaud (google it) if you don't have it, and run it
	Open the exported WEAPONS.ivaud in GTA-IVaud
	Click on SNIPERRIFLE_SHOT1_L.wav, then click Edit>Import WAV, and navigate to where the M1 Garand WAVs are: M1 Garand\SOUND\
	Double click on SNIPERRIFLE_SHOT1_L.wav and click yes to any messages that pop up
	Repeat for SNIPERRIFLE_SHOT1_R.wav
	Save
	Now you have to Import the recently saved WEAPONS.ivaud in SparkIV, and remember to SAVE!


==========
WEAPONINFO
==========

Go to Common\Data\Weaponinfo.xml, make a copy of it for backup, right click on it and hit properties, untick "Read Only" and hit apply. Open it in the text editor of your choice (Notepad++ ftw). Scroll down until you find <weapon type="M40a1">. 
Replace all the lines from <weapon type="M40a1"> to </weapon> with the following:


	<weapon type="M40a1">
		<data slot="SNIPER" firetype="DELAYED_HIT" damagetype="BULLET" group="RIFLE_SNIPER" targetrange="40.0" weaponrange="440.0" clipsize="8" ammomax="160" timebetweenshots="153">
			<damage base="80" fps="853" networkplayermod="2.0" networkpedmod="1.0"/>
			<physics force="10.0"/>
			<reload time="1300" fasttime="1066" crouchtime="1066"/>

			<aiming accuracy="4.0" accuracyfps="0.0">
				<offset x="0.16" y="1.0" z="0.55"/>
				<crouchedoffset x="0.16" y="1.0" z="0.12"/>
				<reticule standing="0.6" ducked="0.5" scale="0.05"/>
			</aiming>

			<pickup regentime="360000" ammoonstreet="10"/>

			<controller>
				<rumble duration="120" intensity="0.3"/>
			</controller>

			<flags>
				<flag>GUN</flag>
				<flag>2HANDED</flag>
				<flag>ANIM_RELOAD</flag>
				<flag>CAN_FREE_AIM</flag>
				<flag>ANIM_CROUCH_FIRE</flag>
			</flags>
		</data>

		<assets model="w_rifle">
			<anim group="gun@rifle">
			<rates firerate="2.0" blindfirerate="2.0">
			</anim>
			<effects>
				<muzzle fx="muz_machine"/>
				<shell fx="weap_ejected_rifle"/>
			</effects>
		</assets>
	</weapon>